﻿
<CnGalWebSite.Shared.MasaComponent.PC.Home.Cards.Shared.IconChip Outlined Color="@GetColor()" Icon="@GetIcon()" Text="@(CanComment?"开启":"关闭")" />

 @code {
    [Parameter]
    public bool CanComment { get; set; }

    public string GetColor()
    {
        return CanComment switch
        {
            true => "success",
            false => "error"
        };
    }

    public IconType GetIcon()
    {
        return CanComment switch
        {
            false => IconType.DisableComment,
            true => IconType.Comment,
        };
    }
}
